home *** CD-ROM | disk | FTP | other *** search
-
-
- $PARENT=1;
-
- sub lock{
- if ($flock_exists == 1){
- local ($file_handle);
- foreach $file_handle (@_){
- flock($file_handle, 2);
- }
- }
- }
-
- sub unlock{
- if ($flock_exists == 1){
- local ($file_handle);
- foreach $file_handle (@_){
- flock($file_handle, 8);
- }
- }
- }
-
- sub cleanMessage{
- select(STDOUT);
- print "Content-type: text/html\n\n";
- if ($ENV{'QUERY_STRING'} == ''){
- select(STDOUT);
- print "<html><head>oh no!</head>Must provide an argument!</html>";
- }
- $inp = "../message/".$ENV{'QUERY_STRING'};
- $inp2 = "message/".$ENV{'QUERY_STRING'};
- unlink $inp;
- open(IND,"+ ../message/bbs-data.html");
- lock(IND);
-
- #locate string position
-
- # while($cool = <IND>){
- while(<IND>){
- # if (<IND> =~ $inp2){
-
- # }
- # else {
- print;
- # }
- }
- #delete line from file
-
- close(IND);
-
- }
-
-
- &cleanMessage;
-
- select(STDOUT);
-
- print <<"END";
-
- END
-